package eol;
import static org.junit.Assert.*;

import org.junit.Test;


public class Ifs extends BasicTest {
    
    @Test
    public void testIf0() {
        assertEquals( "3.0"+newline, go("1 + if null [] then 2 else 3 end if  ;" ) ) ;
    }

    @Test
    public void testIf1() {
        assertEquals( "4.0"+newline, go("1 + if null 1 then 2 else 3 end if ;" ) ) ;
    }

    @Test
    public void testIf2() {
        assertEquals( "10.0"+newline,
        		go("2 * if null (1:2) then 2 else 3 end if + 4;" ) ) ;
    }

    @Test
    public void testIf3() {
        assertEquals( "3.0"+newline,
        		// I really should add an elseif syntax
        		go("if null 2 then 2 else if atomic 1 then 3 else 4 end if end if ;" ) ) ;
    }
 }
